/**************************************************************
   SksDebug is a library for the ESP8266/Arduino platform
   (https://gitee.com/shoukaiseki/SksDebug) to enable easy
   configuration and reconfiguration of WiFi credentials using a Captive Portal

   
   Built by Shoukaiseki https://gitee.com/shoukaiseki
   木兰宽松许可证
 **************************************************************/

#include "SksDebug.h"
#include <ESP8266WiFi.h>

SksDebug::SksDebug(bool debug) {
    sks_debug = debug;
}

/**
template <typename Generic>
void SksDebug::debug(Generic text) {
  if (sks_debug) {
    Serial.println(text);
  }
}
template <typename Generic>
void SksDebug::debugln(Generic text) {
  if (sks_debug) {
    Serial.println(text);
  }
}
**/
void SksDebug::debug(const char* text) {
  if (sks_debug) {
    Serial.print(text);
  }
}

void SksDebug::debugln(const char* text) {
  if (sks_debug) {
    debug(text);
	Serial.println();
  }
}